package com.huike.controller.clue;

import com.huike.entity.ClueTrackRecord;
import com.huike.result.Result;
import com.huike.service.ClueService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/clues/record")
public class ClueTrackRecordController {
    @Autowired
    private ClueService clueService;

    /**
     * 查询线索跟进记录
     * @param id
     * @return
     */
    @GetMapping("/{id}")
    public Result findByClueId(@PathVariable Long id){
        return clueService.findByClueId(id);
    }


    @PostMapping
    public  Result createClueRecord(@RequestBody ClueTrackRecord clueTrackRecord){
        return clueService.createClueRecord(clueTrackRecord);
    }

}
